﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace weba
{
    public partial class buywebsite : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            T_UserInfo n = new T_UserInfo();
            n.T_Person = C1InputText1.Text.ToString();
            n.T_CompanyName = C1InputText2.Text.ToString();
            n.T_Tel = C1InputText3.Text.ToString();
            n.T_NowService = "Admin";
            n.T_Province = "全国";
            n.T_UserState = Convert.ToByte("1");
            n.T_UserType = Convert.ToByte("0");
            n.T_UserFrom = Convert.ToByte("0");
            n.T_UserLeave = Convert.ToByte("0");
            mk.l.T_UserInfo.InsertOnSubmit(n);
            mk.l.SubmitChanges();
            string uidmax = n.T_UserID.ToString();
            //  string svrid = (from a in sj.T_ServiceUser from b in sj.T_UserInfo where a.T_ServiceName == b.T_NowService & b.T_UserID.ToString() == uidmax select a).FirstOrDefault().T_ServiceID.ToString();
            string svrid = "20";
            mk.l.addlog(int.Parse(uidmax), int.Parse(svrid), "网站类型" + this.C1ComboBox1.SelectedItem.Text.ToString() + this.C1ComboBox2.SelectedItem.Text.ToString() + C1Editor1.Text.ToString().Trim());
            mk.l.SubmitChanges();
            Label1.Text = "您的留言编号是" + uidmax + "已成功提交留言,请等待回复";
        }
    }
}